﻿@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>系统登录</title>
    <style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	overflow:hidden;
}
.STYLE3 {color: #528311; font-size: 12px; }
.STYLE4 {
	color: #42870a;
	font-size: 12px;
}
form{margin: 0;padding:0}
-->
</style>
<script src="/scripts/jquery.js" type="text/javascript"/>
<script type="text/javascript">

    $(function () {
        $(document).keyup(function (event) {
            if (event.keyCode == 13) {
                checksubmit();
            }
        });
        $('.login').click(function () {
            checksubmit();
        });

        $('.reset').click(function () {

            $('input[name="username"]').val("");
            $('input[name="password"]').val("");

        });
        $('input[name="username"]').focus(); //初始化 文本框焦点为用户名
    });
    function checksubmit() {
        var name = $('input[name="username"]').val();

        var password = $('input[name="password"]').val();

        if (name == "") {
            alert('请输入用户名');
            $('input[name="username"]').focus();
            return false;
        }
        else {
            if (password == "") {
                alert('请输入密码');
                $('input[name="password"]').focus();
                return false;
            }
        }
        $('form[name="loginform"]').submit();
    }

</script>
   
</head>
<body>
    <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td bgcolor="#e5f6cf">&nbsp;</td>
  </tr>
  <tr>
    <td height="608" background="/content/img/login_03.gif"><table width="862" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td height="266" background="/content/img/login_04.gif">&nbsp;</td>
      </tr>
      <tr>
        <td height="95">
<form id="loginform" action="/account/login" method="post" class="form-horizontal">
 <input type="hidden" name="token" />
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="424" height="95" background="/content/img/login_06.gif">&nbsp;</td>
            <td width="183" background="/content/img/login_07.gif">
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="21%" height="23" align="right"><div align="right" style="margin-right:2px"><span class="STYLE3">用户</span></div></td>
                <td width="79%" colspan="2" height="23"><input type="text" name="username"  style="height:18px; width:130px; border:solid 1px #cadcb2; font-size:12px; color:#81b432;" value="@ViewBag.UserName"/></td>
              </tr>
              <tr>
                <td height="23" align="right"><div align="right" style="margin-right:2px"><span class="STYLE3">密码</span></div></td>
                <td height="23"  colspan="2"><input type="password" name="password"  style="height:18px; width:130px; border:solid 1px #cadcb2; font-size:12px; color:#81b432;"></td>
              </tr>
              <tr>
                <td width="21%" height="23"><div align="right" style="margin-right:2px"><span class="STYLE3">验证码</span></div></td>
                <td width="30%" height="23" ><input type="text" name="validCode" maxlength="4" style="height:18px; width:40px; border:solid 1px #cadcb2; font-size:12px; color:#81b432;"/></td>
                <td width="49%" height="23"><div id="codeimg"></div></td>
              </tr>
              <tr>
                <td height="23">&nbsp;</td>
                <td height="23"  colspan="2"><img src="/content/img/dl.gif" width="81" height="22" border="0" usemap="#Map"></td>
              </tr>
            </table></td>
            <td width="255" background="/content/img/login_08.gif">&nbsp;</td>
          </tr>
        </table>
</form>
      </td>
      </tr>
      <tr>
        <td height="247" valign="top" background="/content/img/login_09.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="22%" height="30">&nbsp;</td>
            <td width="56%"  align="center">@{
                if( ViewBag.Error!=null)
                {
                    <label style="margin-left:40px;color:Red;font-size:10px">@ViewBag.Error</label>
                }
                }</td>
            <td width="22%">&nbsp;</td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td height="30"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="44%" height="20">&nbsp;</td>
                <td width="56%" class="STYLE4">版本 2013V1.0 </td>
              </tr>
            </table></td>
            <td>&nbsp;</td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td bgcolor="#a2d962">&nbsp;</td>
  </tr>
</table>
<map name="Map"><area shape="rect" coords="3,3,36,19" href="javascript:checksubmit();" class='login'/><area shape="rect" coords="40,3,78,18" href="javascript:reset();" class='reset'/></map>
<script src="/scripts/jquery-1.5.1.js" type="text/javascript"/>
 <script type="text/javascript" src="/scripts/jquery-1.5.1.min.js"></script>
 <script type="text/javascript" src="/Scripts/jquery.validate.js"></script>
    <script type="text/javascript" src="/Scripts/jquery.metadata.js"></script>
     <script type="text/javascript" src="/Scripts/plug.js"></script>
<script type="text/javascript">
       var validation = new plug.BindValidCode();
       $(function () {
           validation.BindValidator();
       });
    function Refalsh(sender) {
        validation.Refalsh(sender);
    } 

   
</script>
 <script type="text/javascript">

     $(function () {
         $(document).keyup(function (event) {
             if (event.keyCode == 13) {
                 checksubmit();
             }
         });
          
         $('input[name="username"]').focus(); //初始化 文本框焦点为用户名
     });

      function reset () {

             $('input[name="username"]').val("");
             $('input[name="password"]').val("");

         }
         function checksubmit() {
            
         var name = $('input[name="username"]').val();

         var password = $('input[name="password"]').val();

         if (name == "") {
             alert('请输入用户名');
             $('input[name="username"]').focus();
             return false;
         }
         else {
             if (password == "") {
                 alert('请输入密码');
                 $('input[name="password"]').focus();
                 return false;
             }
         }
         document.forms["loginform"].submit();
         
     }

</script>
</body>
</html>

